// -*- mode: c++; coding: utf-8 -*-

module Demo {

  enum Role {Leader, Explorer};

  interface Agent;

  struct Vec2 {
    int x;
    int y;
  };

  struct SignPost {
    Vec2 pos;
  };

  sequence<SignPost> SignPostSeq;

  struct Bid {
    Agent* ag;
    SignPost sp;
    int value;
  };

  interface Auctioneer {
    ["ami"] void begin ();
    ["ami"] void receiveBid (Bid b);
    Agent* getLeader (SignPost sp);
  };

  class Message {};

  class Announcement extends Message {
    SignPostSeq signposts;
  };

  class Close extends Message {
    SignPost sp;
  };

  class Finish extends Message {};

  interface Agent {
    ["ami"] void inform (Message m);
  };

};
